<table border="0">
	<tr>
		<td>
        <span><strong><?=$groupname;?></strong></span>
        <input type="hidden" id="idright" value="<?=$id;?>" placeholder=""  />
        </td>
	</tr>
	<tr>
    	<td>
    		<div id="tree"></div>
        </td>
    </tr>
</table>
<link href="<?=url_tmpl()?>tree.css" rel="stylesheet" type="text/css" />
<script src="<?=url_tmpl()?>js/jquery.tree.js" type="text/javascript"></script> 
<script type="text/javascript">
	var url = '<?=base_url()?>';
	var control = 'group';	
	function createNode(){
	  var root = {
		"id" : "0",
		"text" : "Quyền hệ thống",
		"value" : "86",
		"showcheck" : true,
		complete : true,
		"isexpand" : true,
		"checkstate" : <?=$root?>,
		"hasChildren" : true
	  };
	
	  root["ChildNodes"] = <?=$menu?>;
	  return root; 
	}
	treedata = [createNode()];
	var userAgent = window.navigator.userAgent.toLowerCase();
    $.browser.msie8 = $.browser.msie && /msie 8\.0/i.test(userAgent);
    $.browser.msie7 = $.browser.msie && /msie 7\.0/i.test(userAgent);
    $.browser.msie6 = !$.browser.msie8 && !$.browser.msie7 && $.browser.msie && /msie 6\.0/i.test(userAgent);
	function load() {        
		var o = { showcheck: true,     
		cbiconpath:'<?=url_tmpl()?>images/icons/'
		};
		o.data = treedata;                  
		$("#tree").treeview(o);            
	  
	}   
	if( $.browser.msie6){
		load();
	}
	else{
		$(document).ready(load);
	}
</script>